Micron Document
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| SparkN0de-git | SparkN0de |
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


Displaying Rendered • View rawDownload


docs/agents/skills/deferred-network-startup/SKILL.md HEAD (b89dc9e6) Text, 2.02 KB

Skill: deferred-network-startup

Treat HTTP-up as distinct from RNS-ready. Gate UI on T383838/api/v1/status, return 503 for retryable init failures, and contain RNS panic on Android.

When to use

• Changing boot order, status payload, or loading screens
• Adding APIs that need identity / DB / RNS before answering
• Touching Electron loading probes or Android Chaquopy boot
• Debugging "app loads but mesh is dead" or early 500s during start

Lifecycle facts

• HTTP can bind before RNS / identity finish.
• T383838/api/v1/status reports T383838starting / T383838ok / T383838failed with T383838stage and T383838network_ready.
• T383838starting is normal, not an error.
• Electron loading probes accept HTTP 200 with T383838starting or T383838ok. Do not require T383838network_ready before first navigation.
• Vue boot uses startup interpreters that can mount recovery UI when T383838failed still allows degraded UI.
• A browser service worker may serve a cached app shell while T383838/api/v1/status is unreachable. That is not T383838ui_ready. Keep gating on status polling.

API behaviour

• Prefer 503 with a retryable message when identity / DB / network is temporarily unavailable.
• Prefer opaque 500 only for unexpected failures after ready.
• CLI one-shots (T383838--self-check, restore helpers) may still initialize synchronously.

Android / RNS panic

• T383838RNS.panic() must be contained (T383838rns_startup_recovery.py). Uncaught T383838os._exit kills the in-process Android Python host.
• Off-main-thread RNS init cannot register signals. Reinstall handlers on the main loop after ready.

Key files

• T383838meshchatx/meshchat.py (T383838/api/v1/status, background RNS init)
• T383838meshchatx/src/frontend/js/networkStartupWait.js
• T383838electron/loadingStatusProbe.js
• T383838meshchatx/src/backend/rns_startup_recovery.py
• T383838meshchatx/src/backend/reticulum_config_guard.py

Verification

T282828
uv run pytest tests/backend/test_rns_startup_recovery.py -q --tbTff7b72=short
pnpm Tffa657exec vitest run tests/frontend/networkStartupWait.test.js
uv run python -m meshchatx.meshchat --self-check



──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────